<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input type="text" id="num61"/>
		<select id="fh">
			<option value="+">+</option>
			<option value="-">-</option>
			<option value="*">*</option>
			<option value="/">/</option>
		</select>
		<input type="text" id="num62"/>
		<button type="button" onclick="sun();">运算</button>
		结果：<input type="text" id="num63"/>
	</body>
	<script type="text/javascript">
		function sun(){
			
			var abc1=document.getElementById('num61').value;
			var abc2=document.getElementById('num62').value;
			var  myselect=document.getElementById("fh");
			var index=myselect.selectedIndex ; 
			var af=myselect.options[index].value;
			document.getElementById('num63').value= eval(abc1+af+abc2);
		}
	</script>
</html>
